package com.turing.post.organization.util;

import java.util.List;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;

/**
 * 平台机构
 * 
 * @author zxp
 * @Dec 17, 2012
 */
@Remote
@Local
public interface SysBranchDao {

	/**
	 * 根据平台机构号查询平台机构
	 * 
	 * @param branchNo
	 *            平台机构号
	 * @return SysBranch 平台机构
	 */
	public SysBranch getSysBranchByBranchNo(String branchNo);

	/**
	 * 新增平台机构
	 * 
	 * @param sysBranch
	 *            平台机构
	 * @throws PCPSApplicationException
	 */
	public void insertSysBranch(SysBranch sysBranch)
			throws PCPSApplicationException;

	/**
	 * 产生销售机构订单编号
	 * 
	 * @param saleBranchNo
	 * @return
	 * @throws PCPSApplicationException
	 */
	public Integer updateSysBranchOrderSeqNo(String saleBranchNo);

	public void updateSysBranch(SysBranch sysBranch)
			throws PCPSApplicationException;

	/**
	 * 复位机构业务单顺序号
	 * 
	 * @param issueCompanyNo
	 * @throws PCPSApplicationException
	 */
	public void resetSysBranchSeqNoByIssueCompanyNo(String issueCompanyNo)
			throws PCPSApplicationException;

	public void deleteSysBranch(String branchNo)
			throws PCPSApplicationException;

	/**
	 * 从发卡机构或销售机构中根据SysBranchSubord.SubBranchNo获取机构信息
	 * 
	 * @param subBranchNos
	 * @return
	 */
	public List<Object[]> getSysBrchInfoBySubBranchNos(String subBranchNos);
}
